package com.viviman;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * Hello world!
 *
 * @author Vivim
 */
// 开启 EurekaClient 注解，目前版本如何配置了Eureka注册中心，默认开启该注解
// @EnableEurekaClient
@SpringBootApplication
// Todo ReName
public class Consumer01Application
{
    @Bean
    @LoadBalanced
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }

    public static void main( String[] args )
    {
        // Todo ReName
        SpringApplication.run(Consumer01Application.class);
    }
}